import request from '@/utils/request'

/**
 * get
 * @returns 查询企业的部门列表
 */
// 查询企业的部门列表
export const reqGetDepartments = () => {
  return request({
    url: '/company/department'
  })
}

// 根据ID删除部门
export const reqDelDepartMents = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

// 新增部门
export const reqAdddepartMents = (data) => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 获取部门详情
export function reqGetDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}

// 根据ID修改部门详情
export function reqPutDepartDetail(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

